package com.xjmall.controller.portal;

import com.xjmall.common.ServerResponse;
import com.xjmall.pojo.Category;
import com.xjmall.service.ICategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by An on 2017/8/8.
 */
@Controller
@RequestMapping("/category/")
public class CategoryController {

    @Autowired
    private ICategoryService iCategoryService;

    @RequestMapping("list.do")
    @ResponseBody
    public ServerResponse<List<Category>> list(){
        return iCategoryService.getMCategories();
    }

}
